package com.gs.userservice.service.impl;

import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.gs.userservice.dao.UserRepository;
import com.gs.userservice.entity.SysUser;
import com.gs.userservice.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ProjectName: apollomodulestest
 * @Package: com.gs.userservice.service.impl
 * @Description: java类作用描述
 * @Author: guoshuai
 * @CreateDate: 2019/7/26 19:45
 * @UpdateUser: guoshuai
 * @UpdateDate: 2019/7/26 19:45
 * @UpdateRemark: The modified content
 * @Version: 1.0
 **/
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserRepository  userDao;

    @Override
    @LcnTransaction//分布式事务
    @Transactional//本地事务注解
    public void saveUser(SysUser sysUser) {
        userDao.save(sysUser);
    }
}
